xc_console is probably too chatty about termios failures since ssh
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 5 Aug 2005 09:00:50 +0000 (09:00 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 5 Aug 2005 09:00:50 +0000 (09:00 +0000)
sessions apparently don't have proper term settings.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tools/consoled/xc_console.c

index 91fe89bf72604cfea740c76b5d8b32a77878b09d..dab250baa8d2fe52b40251a807e0de947be9fedb 100644 (file)
@@ -78,23 +78,18 @@ static void init_term(int fd, struct termios *old)
        struct termios new_term;
 
        if (tcgetattr(fd, old) == -1) {
-               perror("tcgetattr() failed");
                return;
        }
 
        new_term = *old;
        cfmakeraw(&new_term);
 
-       if (tcsetattr(fd, TCSAFLUSH, &new_term) == -1) {
-               perror("tcsetattr() failed");
-       }
+       tcsetattr(fd, TCSAFLUSH, &new_term);
 }
 
 static void restore_term(int fd, struct termios *old)
 {
-       if (tcsetattr(fd, TCSAFLUSH, old) == -1) {
-               perror("tcsetattr() failed");
-       }
+       tcsetattr(fd, TCSAFLUSH, old);
 }
 
 static int console_loop(int xc_handle, domid_t domid, int fd)
@@ -113,7 +108,6 @@ static int console_loop(int xc_handle, domid_t domid, int fd)
                        if (errno == EINTR || errno == EAGAIN) {
                                continue;
                        }
-                       perror("select() failed");
                        return -1;
                }
 
@@ -131,7 +125,6 @@ static int console_loop(int xc_handle, domid_t domid, int fd)
                                    (errno == EINTR || errno == EAGAIN)) {
                                        continue;
                                }
-                               perror("select() failed");
                                return -1;
                        }
 
@@ -151,7 +144,6 @@ static int console_loop(int xc_handle, domid_t domid, int fd)
                                    (errno == EINTR || errno == EAGAIN)) {
                                        continue;
                                }
-                               perror("select() failed");
                                return -1;
                        }